/*
 Navicat Premium Data Transfer

 Source Server         : 阿里云服务器：SQL Server
 Source Server Type    : SQL Server
 Source Server Version : 13005026
 Source Host           : 121.40.101.29:1433
 Source Catalog        : scm_main_sfl_visit_dev
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 13005026
 File Encoding         : 65001

 Date: 21/09/2020 17:17:36
*/


-- ----------------------------
-- Table structure for bd_visit_area
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[bd_visit_area]') AND type IN ('U'))
	DROP TABLE [dbo].[bd_visit_area]
GO

CREATE TABLE [dbo].[bd_visit_area] (
  [id] int  IDENTITY(1,1) NOT NULL,
  [base_id] int  NOT NULL,
  [area_name] varchar(100) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [is_delete] int DEFAULT ((0)) NOT NULL
)
GO

ALTER TABLE [dbo].[bd_visit_area] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'id',
'SCHEMA', N'dbo',
'TABLE', N'bd_visit_area',
'COLUMN', N'id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'基地ID',
'SCHEMA', N'dbo',
'TABLE', N'bd_visit_area',
'COLUMN', N'base_id'
GO

EXEC sp_addextendedproperty
'MS_Description', N'区域名称',
'SCHEMA', N'dbo',
'TABLE', N'bd_visit_area',
'COLUMN', N'area_name'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否删除',
'SCHEMA', N'dbo',
'TABLE', N'bd_visit_area',
'COLUMN', N'is_delete'
GO


-- ----------------------------
-- Records of [bd_visit_area]
-- ----------------------------
SET IDENTITY_INSERT [dbo].[bd_visit_area] ON
GO

INSERT INTO [dbo].[bd_visit_area] ([id], [base_id], [area_name], [is_delete]) VALUES (N'1', N'100', N'办公区域', N'0')
GO

SET IDENTITY_INSERT [dbo].[bd_visit_area] OFF
GO


-- ----------------------------
-- Primary Key structure for table bd_visit_area
-- ----------------------------
ALTER TABLE [dbo].[bd_visit_area] ADD CONSTRAINT [PK_BD_VISIT_AREA] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

